home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Games Collection 1 / software vault.zip / software vault / CDR02 / DCGAMES1.ZIP / NEWGAME.ZIP / TRAINER.SCR < prev    next >
Text File  |  1992-10-29  |  6KB  |  232 lines

  1. !
  2. ! Default trainer script..
  3. !
  4. ! (c) DC Software, 1992
  5. !
  6.  
  7. !------------------------------------------------------------------------!
  8. :@TALK ! Talk to the character !
  9. !------------------------------------------------------------------------!
  10.  
  11. ! First, say hello.. !
  12.   if NPC.V0 > 0 then
  13.     writeln( "Hello ", player.name, ". What brings you back?" );
  14.   else
  15.     writeln( "Welcome to ", npc.name, ". How may I help you?" );
  16.   endif;
  17.  
  18. ! Now, set some variables..
  19.   NPC.V0 = 1; ! From know on, remember we've been here
  20.   L1   = 0; ! No business transactions have taken place
  21.   L15  = 0; ! Has not asked for credit.. 
  22.  
  23.   L4 = npc.value * (random(3)+1); ! Cost of STRENGTH training !
  24.   L5 = npc.value * (random(3)+1); ! Cost of DEXERITY training !
  25.   L6 = npc.value * (random(3)+1); ! Cost of AIM      training !
  26.   L7 = npc.value * (random(3)+1); ! Cost of Speed    training !
  27.   L8 = npc.value * (random(3)+1); ! Cost of IQ       training !
  28.  
  29. :LOOP
  30.  
  31.   L9 = random(5) + 2; ! Points given when training.. !
  32.  
  33.   L3 = select$( "Strength",     L4,
  34.                 "Dexterity",    L5,
  35.                 "Aim",          L6,
  36.                 "Speed",        L7,
  37.                 "Intelligence", L8,
  38.                 "Talk", -1 );
  39.  
  40.   IF L3 >= 0 AND L3 < 5 GOTO TRAIN;
  41.   IF L3 = 5             GOTO CHAT;
  42.  
  43. :CSTOP
  44.   if L1 = 0 then
  45.     writeln( "Next time buy something!" );
  46.   else
  47.     writeln( "It's been a pleasure doing business with you!" );
  48.   endif;
  49.   STOP;
  50.  
  51. !
  52. ! Want's to train..  Now find out WHO!
  53. !
  54. :TRAIN
  55.  
  56.   writeln( "Who want's to train?" );
  57.   L10 = select( group );
  58.   IF L10 < 0 GOTO LOOP;
  59.   group.current = L10;
  60.  
  61.   ON L3 GOTO XSTR, XDEX, XAIM, XSPD, XIQ;
  62.  
  63. !
  64. ! Increase your strength..
  65. !
  66. :XSTR
  67.  
  68.   if L4 > group.gold goto BROKE;
  69.  
  70.   dec( group.gold, L4 );
  71.   inc( player.mstr, L9 );
  72.   inc( player.str,  L9 );
  73.   writeln( player.name, " undergoes extensive physical training.." );
  74.   writeln( "Your strength has increased by ", L9, " units." );
  75.   inc( L1 );
  76.   GOTO LOOP;
  77.  
  78. !
  79. ! Increase your dexterity..
  80. !
  81. :XDEX
  82.  
  83.   if L5 > group.gold goto BROKE;
  84.  
  85.   dec( group.gold, L5 );
  86.   inc( player.mdex, L9 );
  87.   inc( player.dex,  L9 );
  88.   writeln( "Your dexterity has increased by ", L9, " units." );
  89.   inc( L1 );
  90.   GOTO LOOP;
  91.  
  92. !
  93. ! Increase your aim..
  94. !
  95. :XAIM
  96.  
  97.   if L6 > group.gold goto BROKE;
  98.  
  99.   dec( group.gold, L6 );
  100.   inc( player.maim, L9 );
  101.   inc( player.aim,  L9 );
  102.   writeln( "You practice with all kinds of missle weapons, including" );
  103.   writeln( "stationary and moving targets." );
  104.   writeln( "Your aim has increased by ", L9, " units." );
  105.   inc( L1 );
  106.   GOTO LOOP;
  107.  
  108. !
  109. ! Increase your speed
  110. !
  111. :XSPD
  112.  
  113.   if L7 > group.gold goto BROKE;
  114.  
  115.   dec( group.gold, L7 );
  116.   inc( player.miq, L9 );
  117.   inc( player.iq,  L9 );
  118.   writeln( "You learn that every move you make is followed by another" );
  119.   writeln( "and practice teaches your body to anticipate that move and" );
  120.   writeln( "flow into it.  You never thought of yourself as 'gracefull'." );
  121.   writeln( "Your iq has increased by ", L9, " units." );
  122.   inc( L1 );
  123.   GOTO LOOP;
  124.  
  125. !
  126. ! Increase your iq..
  127. !
  128. :XIQ
  129.  
  130.   if L8 > group.gold goto BROKE;
  131.  
  132.   dec( group.gold, L8 );
  133.   inc( player.miq, L9 );
  134.   inc( player.iq,  L9 );
  135.   writeln( "You learn some new concentration techniques and fine tune" );
  136.   writeln( "your deductive reasoning methods.." );
  137.   writeln( "Your iq has increased by ", L9, " units." );
  138.   inc( L1 );
  139.   GOTO LOOP;
  140.  
  141. :BROKE
  142.   writeln( "You don't have enough money!");
  143.   voice( "Broke" );
  144.   goto LOOP;
  145.  
  146. !
  147. ! Handle conversation..
  148. !
  149. :CHAT
  150.   writeln( "What would you like to talk about?" );
  151.  
  152. :CHAT1
  153.   L3 = getstr("Name","Strength","Dexerity","Aim","I.Q.","Train","Credit","Job","Bye");
  154.   if L3 = -1 then 
  155.     writeln( "Ok." );
  156.     goto LOOP; ! Pressed ESCape !
  157.   endif;
  158.  
  159. ! First, see if the keyword typed is in the character's text block !
  160.   if dotext( S0 ) goto CHAT1;
  161.  
  162. ! It didn't, so try the predefined ones..
  163.   on L3 goto CNAME, CSTR, CDEX, CAIM, CIQ, CTRAIN, CCREDIT, CJOB, CSTOP;
  164.  
  165. ! Nope, try a 'DEFAULT' line
  166.   if not dotext( "DEFAULT" ) then
  167.     writeln( "I don't know anything about that!" );
  168.   endif;
  169.   goto CHAT1;
  170.  
  171. :CNAME 
  172.   writeln( "My name is ", NPC.name, "."                    );
  173.   goto CHAT1;
  174.  
  175. :CSTR
  176.   writeln( "Strength let's you carry heavier weights" );
  177.   writeln( "It also increases the damage you do with contact weapons" );
  178.   goto CHAT1;
  179.  
  180. :CDEX
  181.   writeln( "Dexterity allows you to a void hits when being attacked" );
  182.   writeln( "It also helps avoid traps!" );
  183.   goto CHAT1;
  184.  
  185. :CAIM
  186.   writeln( "Good aim is needed when using missle weapons." );
  187.   writeln( "During a fight, the targets move a lot and aim is essential" );
  188.   goto CHAT1;
  189.  
  190. :CSPD
  191.   writeln( "With practice, your body can react a lot faster than you can" );
  192.   writeln( "think.  Speed gives you an edga allowing an extra hit during" );
  193.   writeln( "a battle." );
  194.   goto CHAT1;
  195.  
  196. :CIQ
  197.   writeln( "A magician must learn to concentrate and focus their mental" );
  198.   writeln( "powers.  I teach techniques that increase your ability to tap" );
  199.   writeln( "your inner strength." );
  200.   goto CHAT1;
  201.  
  202. :CCREDIT
  203.   L3 = select( "MasterCard", 
  204.                "Visa",
  205.                "Am. Express",
  206.                "Diner's Club",
  207.                "Discover",
  208.                "Sears" );
  209.   if L3 >= 0 then
  210.     if L15 > 0 then
  211.       writeln( "I don't take that one either.." );
  212.       if L15 = 2 then
  213.         writeln( "(you start to see a pattern here..)" );
  214.       endif;
  215.     else
  216.       writeln( "Sorry, I don't take that one.." );
  217.     endif;
  218.   endif;
  219.   inc( L15 );
  220.   goto CHAT1;
  221.  
  222. :CTRAIN
  223.   writeln( "What do you want to train in?" );
  224.   goto LOOP;
  225.  
  226. :CJOB
  227.   writeln( "I teach people to use what nature has already given them!" );
  228.   goto CHAT1;
  229.  
  230. ! Feel free to expand on this list.. !
  231.  
  232.